<template>
    <el-container>
        <el-main>
            <div id="main" style="width: 1800px;height: 600px;"></div>
        </el-main>
    </el-container>
</template>

<script>
    import echarts from 'echarts'
    export default {
        name: 'CategoryGood',
        methods:{
            drawPie(id){
                this.charts = echarts.init(document.getElementById(id))
                this.charts.setOption({
                    title: {
                        text: '分类点赞数分析   (万篇）'
                    },
                    xAxis: {
                        type: 'category',
                        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
                    },
                    yAxis: {
                        type: 'value'
                    },
                    series: [{
                        data: [1820, 1932, 1901, 1934, 11290, 11330, 11320],
                        type: 'line'
                    }]
                })
            }
        },
        //调用
        mounted(){
            this.$nextTick(function() {
                this.drawPie('main')
            })
        }
    }
</script>

<style scoped>

</style>